#include<stdio.h>
int main()
{
    float baseSalary=500,p,commission=0;
    printf("input p: ");
    scanf("%f,&p");
    if(p>10000){
        commission=(p-10000)*0.25+5000*0.2+3000*0.15+1000*0.1;
    }else if(p>5000){
        commission=(p-5000)*0.2+3000*0.15+1000*0.1;
    }else if(p>2000){
        commission=(p-2000)*0.15+1000*0.1;
    }else if(p>1000){
        commission=(p-1000)*0.1;
    }else{
        commission=0;
    }
    float totalSalary=baseSalary+commission;
    printf("salary is%.2yuan\n",tatalSalary);
    return 0;
}